﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using BaseData;
using TaxEntity.Log;
using TaxEntity.User;
using TaxData.Log;

namespace TaxBiz.Log
{
    /// <summary>
    /// 登陆日志逻辑层
    /// </summary>
    public class LoginLogBiz
    {
        /// <summary>
        /// 获取登陆日志列表
        /// </summary>
        public static DataTable GetList(string strWhere, int pageSize, int page, ref int allCount)
        {
            DataTable dt = LoginLogData.GetList(strWhere, pageSize, page, ref allCount);
            return dt;
        }

        /// <summary>
        /// 增加登录日志
        /// </summary>
        /// <param name="model">用户信息</param>
        /// <param name="loginType">1--登陆，0--退出</param>
        public static bool Add(UserEntity model, int loginType)
        {
            bool isSucc = true;
            try
            {
                isSucc = LoginLogData.Add(model, loginType);
                return isSucc;
            }
            catch
            {
                return false;
            }
        }
    }
}
